#pragma once
#include "include/cef_app.h"
#include <list>
class PageHandler:public CefClient, public CefLifeSpanHandler
{
public:
	PageHandler() = default;
	CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() override { return this; }
	void OnAfterCreated(CefRefPtr<CefBrowser> browser) override;
	void OnBeforeClose(CefRefPtr<CefBrowser> browser) override;
private:
	IMPLEMENT_REFCOUNTING(PageHandler);
	std::list<CefRefPtr<CefBrowser>> browsers;
};

